/*
 * Toedo
 * Copyright (C) 2009-2010 J. Devauchelle and contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * version 3 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

package org.toedo.model;

/**
 * Base class for class which are intended to be serializable by XStream.
 *  
 * @author jerem
 *
 */
public abstract class XStreamSerializableObject {

	/**
	 * XStream call this method after having deserialized an object.
	 * This is use to perform initialization of new members (i.e. for members which are not present in the XML file),
	 * in order to be sure these new members are serialized next time the file is saved, and to avoid null pointers.
	 * 
	 * @return
	 */
	protected abstract Object readResolve();
	
}
